<?php


namespace App\Models\CacheModel;


use App\Models\Api\BaseCache;

class ZlCouponAttr extends BaseCache
{
    protected $table = 'wechat_backup_07_18_14_43_00.zl_coupon_attr';
    protected $cacheModel = 'coupon.attr';

    /**
     * 批量获取数据
     * @param $ids
     * @param $type
     * @param $sortType
     * @return array|false|string|void
     */
    public function getInfoByIdsInData($ids, $type, $sortType)
    {
        try
        {
            $data = $this->where(['id' => ['in', $ids]])->column('name,desc,type,discount,condition,rand_min,rand_max,ur_id,use_range,gids,create_time', 'id');
        }
        catch (\Exception $e)
        {
            $data = [];
        }
        return $data;
    }
}
